

********************************************************************************************************************
*****                                         OUTLINE                                                          *****
*****__________________________________________________________________________________________________________*****
*****                                                                                                          *****
***** TABLE 1: Impact of the 300 THB Minimum Wage on Labor Market Outcomes of Young Workers Aged 15-24         *****
***** TABLE 2: Dynamic Impact of the 300 THB Minimum Wage on School Dropout                                    *****
***** TABLE 3: Heterogeneous Impacts of the 300 TBH Minimum Wage on School Dropout                             *****
***** FIGURES                                                                                                  *****
***** APPENDIX                                                                                                 *****
*****                                                                                                          *****
********************************************************************************************************************

clear all
set more off
cap log close
*Change this to your Replication Folder
cd "C:\Users\wie-dainn\Dropbox\Work\Pleng\Article Version\"


use "Data/data.dta", clear

********************************************************************************************************************
***** TABLE 1: Impact of the 300 THB Minimum Wage on Labor Market Outcomes of Young Workers Aged 15-24         *****
********************************************************************************************************************

drop if year==2012
keep if age>=15 & age<=24

*(1)
reghdfe employ2 taup1* manup1* sex area member if age>=15 & age<=24 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table1.doc", replace label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Paid employment") title("TABLE 1: Impact of the 300 THB Minimum Wage on Labor Market Outcomes")
*(2)
reghdfe employ3 taup1* manup1* sex area member if age>=15 & age<=24 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table1.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Unpaid employment")

*(3)
reghdfe lnrwage_month taup1* manup1* sex area member if age>=15 & age<=24 & paid==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table1.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Log(wage)")

********************************************************************************************************************
***** TABLE 2: Dynamic Impact of the 300 THB Minimum Wage on School Dropout                                    *****
********************************************************************************************************************

use "Data/data.dta", clear
drop if year==2012

*(1)
reghdfe schdrop taup1* manup* sex member if age>=15 & age<=24 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table2.doc", replace label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("All") title("TABLE 2: Dynamic Impact of the 300 THB Minimum Wage on School Dropout (15-24)")

*(2)
reghdfe schdrop taup1* manup* sex member if age>=15 & age<=24 & area==0 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table2.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("Rural Area") 

*(3)
reghdfe schdrop taup1* manup* sex member if age>=15 & age<=24 & area==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table2.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("Urban Areas") 

********************************************************************************************************************
***** TABLE 3: Heterogeneous Impacts of the 300 THB Minimum Wage on School Dropout                             *****
********************************************************************************************************************

use "Data/data.dta", clear

drop if year==2012

gen HSES = 0
replace HSES = 1 if HSESr==1&area==0
replace HSES = 1 if HSESu==1&area==1

gen taup_hses=taup*HSES
gen taup_hses13=taup13*HSES
gen taup_hses14=taup14*HSES
gen taup_hses15=taup15*HSES
gen taup_hses16=taup16*HSES

label var taup_hses13 "EMWp * Year2013 * HSES"
label var taup_hses14 "EMWp * Year2014 * HSES"
label var taup_hses15 "EMWp * Year2015 * HSES"
label var taup_hses16 "EMWp * Year2016 * HSES"

*(1)
reghdfe schdrop taup1* taup_hses1* manup* HSES sex member if age>=15 & age<=24 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table3.doc", replace label dec(3) keep(taup1* taup_hses1* HSES) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("All: 15-24") title("TABLE 3: Dynamic Effect of the Change in Thailand's Minimum Wage on School Dropout for HSES Young Adults")

replace taup_hses13=tauph13
replace taup_hses14=tauph14
replace taup_hses15=tauph15
replace taup_hses16=tauph16

*(2)
reghdfe schdrop taup1* taup_hses1* manup* HSESr sex member if age>=15 & age<=24 & area==0 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/Table3.doc", append label dec(3) keep(taup1* taup_hses1* HSESr) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("Rural Areas: 15-24") 

replace taup_hses13=taupuh13
replace taup_hses14=taupuh14
replace taup_hses15=taupuh15
replace taup_hses16=taupuh16

*(3)
reghdfe schdrop taup1* taup_hses1* manup* HSESu sex member if age>=15 & age<=24 & area==1 [pw=weight], absorb(year province) cluster(PSU_NO) 
outreg2 using "Tables/Table3.doc", append label dec(3) keep(taup1* taup_hses1* HSESu) addtext(Province FE, YES, Year FE, YES, Provincial-specific Controls, YES, Individual Controls, YES) ctitle("Urban Areas: 15-24")


********************************************************************************************************************
*****                                                 FIGURES                                                  *****
********************************************************************************************************************

use "Data/data.dta", clear

**Figure1

preserve

collapse (mean) pMW, by(province year)
collapse (mean) pMW, by(year)
graph twoway line pMW year, yscale(range(0 350) titlegap(1)) xlabel(#10) title("Figure1: Thailand's Average Provincial Minimum Wage") ytitle("Average Privincial Minimum Wage (THB)") xtitle("Year") xline(2013)
graph export "Figures/Figure1.png", replace 

restore

********************************************************************************************************************
*****                                           APPENDIX                                                       *****
********************************************************************************************************************

use "Data/data.dta", clear

**TABLE A2: Summary Statistics                                                        

keep if year>=2011 & year<=2016
drop if year==2012
keep if age>=15 & age<=24
drop if province==43 | province==38
gen HSES = 0
replace HSES = 1 if HSESr==1&area==0
replace HSES = 1 if HSESu==1&area==1

asdoc sum schdrop employ2 employ3 female member area HSES, save(Tables/TableA2.doc) replace


*Paid Workers

preserve

keep if employ2==1
asdoc sum lnrwage_month, save(Tables/TableA2.doc) append
asdoc tabstat lnrwage_month, if employ2=1, save(Tables/TableA2.doc) append

restore


*TABLE A3: Impact of the 300 THB Minimum Wage on Labor Market Outcomes of Young Workers Aged 15-24        

drop if year==2012

*(1)
reghdfe employ2 taup1* manup1* sex area member if age>=15 & age<=24 & area==0 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", replace label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Rural Paid employment") title("TABLE A3: Impact of the 300 THB Minimum Wage on Labor Market Outcomes (Non-migrants)")

*(2)
reghdfe employ3 taup1* manup1* sex area member if age>=15 & age<=24 & area==0 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Rural Unpaid employment")

*(3)
reghdfe lnrwage_month taup1* manup1* sex area member if age>=15 & age<=24 & area==0 & paid==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Rural Log(wage)")

*(4)
reghdfe employ2 taup1* manup1* sex area member if age>=15 & age<=24 & area==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Urban Paid employment") 

*(5)
reghdfe employ3 taup1* manup1* sex area member if age>=15 & age<=24 & area==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Urban Unpaid employment")

*(6)
reghdfe lnrwage_month taup1* manup1* sex area member if age>=15 & age<=24 & area==1 & paid==1 [pw=weight], absorb(year province) cluster(PSU_NO)
outreg2 using "Tables/TableA3.doc", append label dec(3) keep(taup1*) addtext(Province FE, YES, Year FE, YES, Individual Controls, YES, Provincial-specific Controls, YES) ctitle("Urban Log(wage)")



